package org.eclipse.ui.examples.rubyeditor.template;

import org.eclipse.jface.text.templates.GlobalTemplateVariables;
import org.eclipse.jface.text.templates.TemplateContextType;

public class RubyContextType extends TemplateContextType {

	/** This context's id */
	public static final String RUBY_CONTEXT_TYPE= "org.eclipse.ui.examples.rubyeditor.ruby"; //$NON-NLS-1$

	public RubyContextType() {
		addGlobalResolvers();
	}

	public RubyContextType(String id) {
		super(id);
		// TODO Auto-generated constructor stub
	}

	public RubyContextType(String id, String name) {
		super(id, name);
		// TODO Auto-generated constructor stub
	}

	private void addGlobalResolvers() {
		addResolver(new GlobalTemplateVariables.Cursor());
		addResolver(new GlobalTemplateVariables.WordSelection());
		addResolver(new GlobalTemplateVariables.LineSelection());
		addResolver(new GlobalTemplateVariables.Dollar());
		addResolver(new GlobalTemplateVariables.Date());
		addResolver(new GlobalTemplateVariables.Year());
		addResolver(new GlobalTemplateVariables.Time());
		addResolver(new GlobalTemplateVariables.User());
	}
}
